<!-- <button nz-button (click)="addRow()" nzType="primary">Add</button>
<br /> -->
<button class="margin-r-10" nz-button (click)="addRow()" nzType="primary">新增</button>
<button nz-button (click)="initData()" nzType="primary">重置</button>
<br />
    <br />
    <nz-table #editRowTable nzBordered [nzData]="listOfData" [nzFrontPagination]="false">
      <thead>
        <tr>
          <!-- <th nzWidth="30%">Name</th>
          <th>Age</th>
          <th>Address</th>
          <th>Action</th> -->
          <th nzWidth="30%">姓名</th>
          <th>年龄</th>
          <th>地址</th>
          <th>操作</th>
        </tr>
      </thead>
      <tbody> 
        @for (data of editRowTable.data; track data) {
          <tr class="editable-row">
            <td>
              <div class="editable-cell" [hidden]="editId === data.id" (click)="startEdit(data.id)">
                {{ data.name }}
              </div>
              <input [hidden]="editId !== data.id" type="text" nz-input [(ngModel)]="data.name" (blur)="stopEdit()" />
            </td>
            <td>{{ data.age }}</td>
            <td>{{ data.address }}</td>
            <td>
              <!-- <a nz-popconfirm nzPopconfirmTitle="Sure to delete?" (nzOnConfirm)="deleteRow(data.id)">Delete</a> -->
              <a class="margin-r-10" (click)="editRow(data)">编辑</a>
              <a nz-popconfirm nzPopconfirmTitle="确认{{data.name}}删除?" (nzOnConfirm)="deleteRow(data.id)">删除</a>
            </td>
          </tr>
        }
      </tbody>
    </nz-table>
    <nz-modal [(nzVisible)]="isVisible" nzTitle="The first Modal" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
      <ng-container *nzModalContent>
        <p>姓名</p>
        <input type="text" nz-input [(ngModel)]="formObj.name" placeholder="inp.ut with clear icon" />

        <p>年龄</p>
        <input type="text" nz-input [(ngModel)]="formObj.age" placeholder="input with clear icon" />

        <p>地址</p>
        <input type="text" nz-input [(ngModel)]="formObj.address" placeholder="input with clear icon" />
      </ng-container>
    </nz-modal>
